<template>
    <div>
        AAAA{{$parent.name}}
        {{name}}
        <button>改变b的内容</button>
    </div>
</template>
<script>
// @ is an alias to /src
import vm from './bus'
export default {
    name: 'aa',
    data() {
        return {
          name:5555
        }
    },
    created() {
      // console.log(this)
      this.$parent.name = 'a改过内容'
      vm.$on('changeA',this.qqq)
    },
    methods: {
      qqq(val){
        this.name = val;
        console.log('这是A组件的一个方法',this)
      }
    },
}
</script>
<style lang="less">

</style>